package cn.doctor.assistant.pad.ui.zhuanzhen;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
import cn.doctor.assistant.pad.R;
import cn.doctor.assistant.pad.base.BaseNetActivity;
import cn.doctor.assistant.pad.entity.TransferBean;

public class TransferDetailActivity extends BaseNetActivity {

    TransferBean transferBean;
    @InjectView(R.id.titlebar_left_title)
    TextView titlebarLeftTitle;
    @InjectView(R.id.titlebar_text_weiruyuan)
    TextView titlebarTextWeiruyuan;
    @InjectView(R.id.titlebar_text_yiruyuan)
    TextView titlebarTextYiruyuan;
    @InjectView(R.id.text_name)
    TextView textName;
    @InjectView(R.id.text_sex)
    TextView textSex;
    @InjectView(R.id.text_phone)
    TextView textPhone;
    @InjectView(R.id.text_org)
    TextView textOrg;
    @InjectView(R.id.text_doctor)
    TextView textDoctor;
    @InjectView(R.id.text_diagnose)
    TextView textDiagnose;
    @InjectView(R.id.text_date)
    TextView textDate;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_transfer_detial);
        ButterKnife.inject(this);
        transferBean = (TransferBean) getIntent().getExtras().getSerializable("transfer");
        initialize();
    }

    void initialize() {
        textName.setText(transferBean.getRealName());
        textSex.setText("性别："+transferBean.getSex());
        textPhone.setText("手机号："+transferBean.getPhone());
        textOrg.setText("转诊机构："+transferBean.getOrgName());
        textDoctor.setText("转诊医生："+transferBean.getDoctor());
        textDiagnose.setText("初步诊断："+transferBean.getNote());
        textDate.setText("申请日期："+transferBean.getCreateDate());
    }

    @OnClick({R.id.titlebar_left_title, R.id.titlebar_text_weiruyuan, R.id.titlebar_text_yiruyuan})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.titlebar_left_title:
                back();
                break;
            case R.id.titlebar_text_weiruyuan:
                showToast("未入院...");
                break;
            case R.id.titlebar_text_yiruyuan:
                showToast("已入院...");
                break;
        }
    }
}
